/// hasNext : true

class WithdrawDetailsModel {
  bool? hasNext;
  List<ListBean>? list;
  List<ResultBean>? result;
  int? total;

  static WithdrawDetailsModel? fromJson(Map<String, dynamic> map) {
    WithdrawDetailsModel withdrawDetailsModel = WithdrawDetailsModel();
    withdrawDetailsModel.hasNext = map['hasNext'];
    withdrawDetailsModel.list = []..addAll((map['list'] as List? ?? []).map((o) => ListBean.fromMap(o)));
    withdrawDetailsModel.result = []..addAll((map['result'] as List? ?? []).map((o) => ResultBean.fromMap(o)));
    withdrawDetailsModel.total = map['total'];
    return withdrawDetailsModel;
  }

  Map toJson() => {
        "hasNext": hasNext,
        "list": list,
        "result": result,
        "total": total,
      };
}

class ResultBean {
  int? uid;
  int? amount;
  int? money;
  int? payMoney;
  int? withdrawType;
  int? status;
  String? id;
  String? name;
  String? oid;
  String? payType;
  String? actName;
  String? act;
  String? userIp;
  String? deviceType;
  String? devID;
  String? statusDesc;
  String? checkedAt;
  String? progressAt;
  String? failureAt;
  String? successAt;
  String? updatedAt;
  String? createdAt;
  String? receivedAt;

  static ResultBean fromMap(Map<String, dynamic> map) {
    ResultBean info = ResultBean();
    info.id = map['id'];
    info.uid = map['uid'];
    info.name = map['name'];
    info.amount = map['amount'];
    info.oid = map['oid'];
    info.money = map['money'];
    info.payMoney = map['payMoney'];
    info.payType = map['payType'];
    info.withdrawType = map['withdrawType'];
    info.actName = map['actName'];
    info.act = map['act'];
    info.userIp = map['userIp'];
    info.deviceType = map['deviceType'];
    info.devID = map['devID'];
    info.status = map['status'];
    info.statusDesc = map['statusDesc'];
    info.checkedAt = map['checkedAt'];
    info.progressAt = map['progressAt'];
    info.failureAt = map['failureAt'];
    info.successAt = map['successAt'];
    info.updatedAt = map['updatedAt'];
    info.createdAt = map['createdAt'];
    info.receivedAt = map['receivedAt'];
    return info;
  }

  Map toJson() => {
        "id": id,
        "uid": uid,
        "name": name,
        "amount": amount,
        "oid": oid,
        "money": money,
        "payMoney": payMoney,
        "payType": payType,
        "withdrawType": withdrawType,
        "actName": actName,
        "act": act,
        "userIp": userIp,
        "deviceType": deviceType,
        "devID": devID,
        "status": status,
        "statusDesc": statusDesc,
        "checkedAt": checkedAt,
        "progressAt": progressAt,
        "failureAt": failureAt,
        "successAt": successAt,
        "updatedAt": updatedAt,
        "createdAt": createdAt,
        "receivedAt": receivedAt,
      };
}

class ListBean {
  int? money;
  int? payMoney;
  int? uid;
  int? amount;
  int? withdrawType;
  int? status;
  String? id;
  String? orderId;
  String? name;
  String? oid;
  String? payType;
  String? actName;
  String? act;
  String? userIp;
  String? deviceType;
  String? devID;
  String? statusDesc;
  String? checkedAt;
  String? progressAt;
  String? failureAt;
  String? successAt;
  String? updatedAt;
  String? createdAt;
  String? desc;
  String? receivedAt;
  String? productName;
  double? actualAmount;
  bool showReason = false; //本地添加字段，是否展示原因

  static ListBean fromMap(Map<String, dynamic> map) {
    ListBean info = ListBean();
    info.id = map['id'];
    info.orderId = map['orderId'];
    info.uid = map['uid'];
    info.name = map['name'];
    info.amount = map['amount'];
    info.oid = map['oid'];
    info.money = map['money'];
    info.payMoney = map['payMoney'];
    info.payType = map['payType'];
    info.withdrawType = map['withdrawType'];
    info.actName = map['actName'];
    info.act = map['act'];
    info.userIp = map['userIp'];
    info.deviceType = map['deviceType'];
    info.devID = map['devID'];
    info.status = map['status'];
    info.statusDesc = map['statusDesc'];
    info.checkedAt = map['checkedAt'];
    info.progressAt = map['progressAt'];
    info.failureAt = map['failureAt'];
    info.successAt = map['successAt'];
    info.updatedAt = map['updatedAt'];
    info.createdAt = map['createdAt'];
    info.receivedAt = map['receivedAt'];
    info.desc = map['desc'];
    info.actualAmount = map['actualAmount']?.toDouble() ?? .0;
    info.productName = map['productName'];
    return info;
  }

  Map toJson() => {
        "id": id,
        "uid": uid,
        "name": name,
        "amount": amount,
        "oid": oid,
        "money": money,
        "payMoney": payMoney,
        "payType": payType,
        "withdrawType": withdrawType,
        "actName": actName,
        "act": act,
        "userIp": userIp,
        "deviceType": deviceType,
        "devID": devID,
        "status": status,
        "statusDesc": statusDesc,
        "checkedAt": checkedAt,
        "progressAt": progressAt,
        "failureAt": failureAt,
        "successAt": successAt,
        "updatedAt": updatedAt,
        "createdAt": createdAt,
        "receivedAt": receivedAt,
        "desc": desc,
        "actualAmount": actualAmount,
      };
}

class IncomeModelList {
  bool? hasNext;
  List<IncomeModel>? list;

  static IncomeModelList? fromJson(Map<String, dynamic>? json) {
    if (json == null) return null;
    IncomeModelList info = IncomeModelList();

    info.hasNext = json['hasNext'];
    if (json['list'] != null) {
      info.list = [];
      json['list'].forEach((v) {
        info.list?.add(IncomeModel.fromJson(v));
      });
    }

    return info;
  }

  Map toJson() => {
        "hasNext": hasNext,
        "list": list,
      };
}

class IncomeModel {
  String? id;
  int? uid;
  String? purchaseOrder;
  String? productID;
  num? amount;
  num? integral;
  String? realIntegral;
  num? actualIntegral;
  num? actualAmount;
  num? tax;
  num? taxAmount;
  String? channelType;
  String? tranType;
  num? tranTypeInt;
  num? performance;
  num? rechargeId;
  RechargeUser? rechargeUser;
  String? desc;
  String? createdAt;
  String? sysType;
  num? agentLevel;
  num? vipLevel;
  String? realAmount;
  String? money;
  String? wlRealAmount;
  num? fruitCoin;
  num? downloadCount;
  num? fruitCoinBalance;
  num? aiMateBalance;
  String? districtCode;
  String? promSeqe;
  bool? isDirect;
  String? discBindAt;

  IncomeModel(
      {this.id,
      this.uid,
      this.purchaseOrder,
      this.productID,
      this.amount,
      this.integral,
      this.realIntegral,
      this.actualIntegral,
      this.actualAmount,
      this.tax,
      this.taxAmount,
      this.channelType,
      this.tranType,
      this.tranTypeInt,
      this.performance,
      this.rechargeId,
      this.rechargeUser,
      this.desc,
      this.createdAt,
      this.sysType,
      this.agentLevel,
      this.vipLevel,
      this.realAmount,
      this.money,
      this.wlRealAmount,
      this.fruitCoin,
      this.downloadCount,
      this.fruitCoinBalance,
      this.aiMateBalance,
      this.districtCode,
      this.promSeqe,
      this.isDirect,
      this.discBindAt});

  handelMoney() {
    double price = (actualAmount ?? 0) / 10;
    return price.toStringAsFixed(2);
  }

  IncomeModel.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    uid = json['uid'];
    purchaseOrder = json['purchaseOrder'];
    productID = json['productID'];
    amount = json['amount'];
    integral = json['integral'];
    realIntegral = json['realIntegral'];
    actualIntegral = json['actualIntegral'];
    actualAmount = json['actualAmount'];
    tax = json['tax'];
    taxAmount = json['taxAmount'];
    channelType = json['channelType'];
    tranType = json['tranType'];
    tranTypeInt = json['tranTypeInt'];
    performance = json['performance'];
    rechargeId = json['rechargeId'];
    rechargeUser = json['rechargeUser'] != null ? new RechargeUser.fromJson(json['rechargeUser']) : null;
    desc = json['desc'];
    createdAt = json['createdAt'];
    sysType = json['sysType'];
    agentLevel = json['agentLevel'];
    vipLevel = json['vipLevel'];
    realAmount = json['realAmount'];
    money = json['money'];
    wlRealAmount = json['wlRealAmount'];
    fruitCoin = json['fruitCoin'];
    downloadCount = json['downloadCount'];
    fruitCoinBalance = json['fruitCoinBalance'];
    aiMateBalance = json['aiMateBalance'];
    districtCode = json['districtCode'];
    promSeqe = json['promSeqe'];
    isDirect = json['isDirect'];
    discBindAt = json['DiscBindAt'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['uid'] = this.uid;
    data['purchaseOrder'] = this.purchaseOrder;
    data['productID'] = this.productID;
    data['amount'] = this.amount;
    data['integral'] = this.integral;
    data['realIntegral'] = this.realIntegral;
    data['actualIntegral'] = this.actualIntegral;
    data['actualAmount'] = this.actualAmount;
    data['tax'] = this.tax;
    data['taxAmount'] = this.taxAmount;
    data['channelType'] = this.channelType;
    data['tranType'] = this.tranType;
    data['tranTypeInt'] = this.tranTypeInt;
    data['performance'] = this.performance;
    data['rechargeId'] = this.rechargeId;
    if (this.rechargeUser != null) {
      data['rechargeUser'] = this.rechargeUser!.toJson();
    }
    data['desc'] = this.desc;
    data['createdAt'] = this.createdAt;
    data['sysType'] = this.sysType;
    data['agentLevel'] = this.agentLevel;
    data['vipLevel'] = this.vipLevel;
    data['realAmount'] = this.realAmount;
    data['money'] = this.money;
    data['wlRealAmount'] = this.wlRealAmount;
    data['fruitCoin'] = this.fruitCoin;
    data['downloadCount'] = this.downloadCount;
    data['fruitCoinBalance'] = this.fruitCoinBalance;
    data['aiMateBalance'] = this.aiMateBalance;
    data['districtCode'] = this.districtCode;
    data['promSeqe'] = this.promSeqe;
    data['isDirect'] = this.isDirect;
    data['DiscBindAt'] = this.discBindAt;
    return data;
  }
}

class RechargeUser {
  int? uid;
  String? name;
  String? portrait;

  RechargeUser({this.uid, this.name, this.portrait});

  RechargeUser.fromJson(Map<String, dynamic> json) {
    uid = json['uid'];
    name = json['name'];
    portrait = json['portrait'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['uid'] = this.uid;
    data['name'] = this.name;
    data['portrait'] = this.portrait;
    return data;
  }
}
